﻿using Microsoft.AspNetCore.Mvc.Filters;

namespace WebAppFilterDemo.FilterExt
{
    public class ActionFilter : Attribute, IActionFilter
    {
        public void OnActionExecuted(ActionExecutedContext context)
        {
            //执行完成....

            Console.WriteLine(" ActionFilter - OnActionExecuted");

        }

        public void OnActionExecuting(ActionExecutingContext context)
        {
            //执行中...

            Console.WriteLine(" ActionFilter - OnActionExecuting");

        }
    }
}
